home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / shells / zsh-3.0-p / zsh-3 / zsh-3.0-pre3 / Makefile.in < prev    next >
Makefile  |  1996-07-04  |  7KB  |  217 lines

  1. #
  2. # $Id: Makefile.in,v 2.11 1996/07/04 20:57:42 hzoli Exp $
  3. #
  4. # Makefile for top level of zsh distribution
  5. #
  6. # Copyright (c) 1996 Richard Coleman
  7. # All rights reserved.
  8. #
  9. # Permission is hereby granted, without written agreement and without
  10. # license or royalty fees, to use, copy, modify, and distribute this
  11. # software and its documentation for any purpose, provided that the
  12. # above copyright notice and the following two paragraphs appear in
  13. # all copies of this software.
  14. #
  15. # In no event shall Richard Coleman or the Zsh Development Group be liable
  16. # to any party for direct, indirect, special, incidental, or consequential
  17. # damages arising out of the use of this software and its documentation,
  18. # even if Richard Coleman and the Zsh Development Group have been advised of
  19. # the possibility of such damage.
  20. #
  21. # Richard Coleman and the Zsh Development Group specifically disclaim any
  22. # warranties, including, but not limited to, the implied warranties of
  23. # merchantability and fitness for a particular purpose.  The software
  24. # provided hereunder is on an "as is" basis, and Richard Coleman and the
  25. # Zsh Development Group have no obligation to provide maintenance,
  26. # support, updates, enhancements, or modifications.
  27. #
  28.  
  29. # zsh version
  30. VERSION = @VERSION@
  31.  
  32. SHELL = /bin/sh
  33. @SET_MAKE@
  34.  
  35. srcdir = @srcdir@
  36. VPATH  = @srcdir@
  37.  
  38. # ========== USER CONFIGURATION SECTION ==========
  39. #
  40. # If `make' is executed in the directory containing this Makefile,
  41. # any changes made in this section will override the values of
  42. # these parameters in makefiles in any of the subdirectories.
  43.  
  44. prefix      = @prefix@
  45. exec_prefix = @exec_prefix@
  46. bindir      = @bindir@
  47. infodir     = @infodir@
  48. mandir      = @mandir@
  49. manext      = 1
  50.  
  51. CC       = @CC@
  52. CPPFLAGS = @CPPFLAGS@
  53. DEFS     = @DEFS@
  54. CFLAGS   = @CFLAGS@
  55. LDFLAGS  = @LDFLAGS@
  56. LIBS     = @LIBS@
  57.  
  58. # ========== YOU SHOULDN'T HAVE TO CHANGE ANYTHING BELOW HERE ==========
  59.  
  60. INSTALL         = @INSTALL@
  61. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  62. INSTALL_DATA    = @INSTALL_DATA@
  63.  
  64. .SUFFIXES:
  65.  
  66. # flags passed to recursive makes in subdirectories
  67. MAKEDEFS = CC='$(CC)' CPPFLAGS='$(CPPFLAGS)' DEFS='$(DEFS)' \
  68. CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \
  69. prefix='$(prefix)' exec_prefix='$(exec_prefix)' bindir='$(bindir)' \
  70. infodir='$(infodir)' mandir='$(mandir)' manext='$(manext)'
  71.  
  72. # subdirectories in distribution
  73. SUBDIRS = Src Doc Etc Functions StartupFiles Misc Util
  74.  
  75. # all files in this directory included in the distribution
  76. DIST = README INSTALL META-FAQ ChangeLog configure.in Makefile.in aclocal.m4 \
  77. config.guess config.sub acconfig.h config.h.in install-sh stamp-h.in \
  78. mkinstalldirs configure
  79.  
  80. # ========== DEPENDENCIES FOR BUILDING AND INSTALLING ==========
  81.  
  82. # default target
  83. all: config.h Makefile $(SUBDIRS)
  84.  
  85. $(SUBDIRS): FORCE
  86.     cd $@ && $(MAKE) $(MAKEDEFS)
  87.  
  88. FORCE:
  89.  
  90. # install everything
  91. install: install.bin install.man install.info
  92.  
  93. # install/uninstall just the binary
  94. install.bin uninstall.bin:
  95.     cd Src && $(MAKE) $(MAKEDEFS) $@
  96.  
  97. # install/uninstall just the man pages
  98. install.man uninstall.man:
  99.     cd Doc && $(MAKE) $(MAKEDEFS) $@
  100.  
  101. # install/uninstall just the info pages
  102. install.info uninstall.info:
  103.     cd Doc && $(MAKE) $(MAKEDEFS) $@
  104.  
  105. # ========== DEPENDENCIES FOR CLEANUP ==========
  106.  
  107. mostlyclean: mostlyclean-recursive mostlyclean-top
  108. clean:       clean-recursive       clean-top
  109. distclean:   distclean-recursive   distclean-top
  110. realclean:   realclean-recursive   realclean-top
  111. superclean:  superclean-recursive  superclean-top
  112.  
  113. mostlyclean-top:
  114.     rm -f *~
  115.  
  116. clean-top: mostlyclean-top
  117.  
  118. distclean-top: clean-top
  119.     rm -f Makefile config.h config.status config.log config.cache stamp-h distname rcsdistname
  120.  
  121. realclean-top: distclean-top
  122.  
  123. superclean-top: realclean-top
  124.     cd $(srcdir) && rm -f config.h.in stamp-h.in configure *~
  125.  
  126. mostlyclean-recursive clean-recursive distclean-recursive realclean-recursive superclean-recursive:
  127.     for subdir in $(SUBDIRS); do \
  128.       target=`echo $@ | sed s/-recursive//`; \
  129.       (cd $$subdir && $(MAKE) $(MAKEDEFS) $$target) || exit 1; \
  130.     done
  131.  
  132. # ========== DEPENDENCIES FOR MAINTENANCE ==========
  133.  
  134. Makefile: Makefile.in config.status
  135.     CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
  136.  
  137. config.status: configure Src/version.h
  138.     ./config.status --recheck
  139.  
  140. configure: configure.in aclocal.m4
  141.     cd $(srcdir) && autoconf
  142.  
  143. config.h: stamp-h
  144. stamp-h: $(srcdir)/config.h.in config.status
  145.     CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
  146.  
  147. config.h.in: stamp-h.in
  148. stamp-h.in: configure.in acconfig.h aclocal.m4
  149.     cd $(srcdir) && autoheader
  150.     echo > $(srcdir)/$@
  151.  
  152. # create tag files for vi and emacs
  153. tags:
  154.     cd Src && $(MAKE) $@
  155.  
  156. test:
  157.     @echo zsh test suite not available yet
  158.  
  159. FTPDIR   = /home/ftp/pub/zsh
  160. FTP_DIST = $(FTPDIR)/zsh-$(VERSION).tar.gz
  161. FTP_RCS  = $(FTPDIR)/zsh-RCS.tar.gz
  162. FTP_DIFF = $(FTPDIR)/zsh-$(VERSION).diff.gz
  163.  
  164. # build zsh distribution
  165. dist: Src tags
  166.     @echo "Begin building zsh distribution"
  167.     Src/zsh -c 'cd $(srcdir) ; \
  168.     ln -sf . zsh-$(VERSION) ; \
  169.     tar cf - zsh-$(VERSION)/**/RCS/*,v(D:s@RCS/@@:s/,v//) | \
  170.         gzip > $(FTP_DIST) ; \
  171.     ln -sf $${$${:-$(FTP_DIST)}#$(FTPDIR)/} $(FTPDIR)/zsh.tar.gz ; \
  172.     rm -f zsh-$(VERSION)'
  173.     @echo "Done building zsh distribution"
  174.  
  175. # build RCS controlled source distribution
  176. dist-rcs: Src tags
  177.     @echo "Begin building zsh distribution (RCS source)"
  178.     Src/zsh -o extendedglob -c 'cd $(srcdir) ; \
  179.     rcs -q -N$${$${:-$(VERSION)}:fs/./_/}: **/RCS/(^(tags|TAGS)),v(D); \
  180.     ln -sf . zsh-RCS ; \
  181.     tar cf - zsh-RCS/**/RCS | gzip > $(FTP_RCS) ; \
  182.     rm -f zsh-RCS'
  183.     @echo "Done building zsh distribution (RCS source)"
  184.  
  185. # make patch against the previous release
  186. dist-diff: Src
  187.     @echo "Making patch against the previous release"
  188.     Src/zsh -o extendedglob -c 'cd $(srcdir) ; \
  189.     VERSION=$(VERSION) ; \
  190.     pl=$${(M)VERSION%%[0-9]##} ; \
  191.     : $${prevrel:=$${VERSION%%[0-9]##}$$((pl-1))} ; \
  192.     rcsdiff -kk -qc -r$${prevrel#2.6-}(:fs/./_/) -r **/RCS/(^(tags|TAGS)),v(D:s@RCS/@@:s/,v//) | \
  193.         gzip > $(FTP_DIFF) ; \
  194.     rm -f $(FTPDIR)/zsh-$${prevrel}.tar.gz'
  195.  
  196. check-rcs: $(DIST) Src
  197.     @echo Checking if there are different working files and rcs files
  198.     Src/zsh -c 'cd $(srcdir) ; \
  199.     integer diffs=0 ; \
  200.     for i in **/RCS/*,v(D:s@RCS/@@:s/,v//) ; do \
  201.         if [[ ! -f $$i ]] then \
  202.         co $$i ; \
  203.         elif ! rcsdiff -q --brief $$i ; then \
  204.         let diffs++ ; \
  205.         fi ; \
  206.     done ; \
  207.     if ((diffs)) then exit diffs ; fi'
  208.  
  209. md5sum:
  210.     cd $(FTPDIR) ; md5sum *.gz > MD5SUM
  211.  
  212. release: check-rcs dist dist-rcs dist-diff md5sum
  213.     cd $(srcdir) && cp -p META-FAQ Etc/FAQ $(FTPDIR)
  214.     cd $(FTPDIR) && \
  215.     sed 's/zsh-[3-9]\.[0-9]\(\.\|-beta\|-pre\)[0-9]\+/zsh-$(VERSION)/' README > README.new && \
  216.     mv README.new README
  217.